#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Date    : 2019
# @Author  : linhu (hlf0312@gmail.com)
# @Link    : TBD
# @Version : $Id$

# Import smtplib for the actual sending function
import smtplib

# Import the email modules we'll need
from email.message import EmailMessage

def sendEmail(sender='jiraVerification@nokia-sbell.com', receiver='lingfeng.hu@nokia-sbell.com', subject='Problematic Jira issues', content='Fill in by yourself'):

	msg = EmailMessage()
	msg.set_content(content)

	msg['Subject'] = subject
	msg['From'] = sender
	msg['To'] = receiver

	# Send the message via our own SMTP server.
	# Need to regist your computer name or IP in SNOW, or get failure '... Relaying denied. IP name lookup failed [10.140.113.130]''
	s = smtplib.SMTP(host='10.130.128.21', port='25')
	s.set_debuglevel(2)
	s.send_message(msg)

	s.quit()

if __name__ == '__main__':
	sendEmail()